The built-in Math object includes mathematical constants and functions. You do not need to create the Math object before using it.
To store a random number between 0 and 1 in a variable called "r_number":
r_number=Math.random() |
To store the rounded number of 8.6 in a variable called "r_number":
r_number=Math.round(8.6) |
#Title: JavaScript Math Object
#Element: 177: JavaScript Math Object